LoadState

open fun LoadState(context: Context): PersistedState

Method for loading PersistedState from SharedPreferences. Attempts to retrieve the data via a key. If found, deserializes the data and returns an persistenceSerializer of PersistedState. Otherwise, will initialize a new persistenceSerializer with an auto-generated respondent ID (should only happen once).

Return

the PersistedState that is stored in SharedPreferences (or a newly instantiated one)

Parameters

context

Throws

potential for serialization exceptions